<?php
include_once('common/header.php');			
if($AppUI->id <=0 || !isset($_SERVER['HTTP_REFERER'])) {
	Vfriend_Function::redirect(HOST_VFRIEND);
}
$intOfflineId 	= $objRequest->getParam('offlineid', 0);
$strRefer		= isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : LINK_OFFLINE;
$objOffline		= new Offline();
$objCommon		= new Vfriend_Common();
$arrRow			= $objOffline->get($intOfflineId);
if(isset($arrRow) && $arrRow['userid'] == $AppUI->id && ABS($arrRow['statuses']) < 2) {
	$intProvinceId	= isset($_SESSION['sOfflineParam']['pprovince']) ? $_SESSION['sOfflineParam']['pprovince'] : $arrRow['province'];
	$arrProvince	= $objCommon->getProvince();
	$this->view->arrProvince	= $arrProvince;
	if($intProvinceId > 0) {
		$this->view->arrDistrict	= $objCommon->getDistrict($intProvinceId);
	}
	$this->view->intProvinceId	= $intProvinceId;
	$this->view->arrCateOffline = $objCommon->getCategoryByType(12);
	$this->view->strPrefer		= $strRefer;
	$this->view->row			= $arrRow;
} else {
	Vfriend_Function::setMsg($arrMessage[2]);
	Vfriend_Function::redirect($strRefer);	
}
?>